<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            display: flex;
            width: 1000px;
            height: 500px;
            background-color: darksalmon;
            /* 默认主轴是 x轴 row */
            /* justify-content   设置主轴上子元素的排列方式 */
            /* flex-start   默认值是从头部开始 如果主轴是x轴，则从左到右 */
            /* justify-content: flex-start; */

            /* flex-end  如果主轴是 x轴 则靠右对齐 */
            /* justify-content: flex-end; */

            /* center   居中对齐 */
            /* justify-content: center; */

            /* space-around  平均分配剩余空间 */
            /* justify-content: space-around; */

            /* 重要  space-between  先两边贴边，再平均分配剩余的空间 */
            justify-content: space-between;

        }
        span {
            width: 100px;
            height: 100px;
            background-color: darkseagreen;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>2</span>
        <span>3</span>
        <span>4</span>
    </div>
</body>
</html>